package com.ruoyi.cs.mapper;

import java.util.List;

import com.ruoyi.cs.domain.TBattleBox;
import com.ruoyi.cs.domain.TBattleInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.PartialUpdate;

/**
 * 对战所参与的盲盒Mapper接口
 * 
 * @author ruoyi
 * @date 2021-08-05
 */
public interface TBattleBoxMapper 
{
    /**
     * 查询对战所参与的盲盒
     * 
     * @param battleboxId 对战所参与的盲盒ID
     * @return 对战所参与的盲盒
     */
    public TBattleBox selectTBattleBoxById(String battleboxId);

    /**
     * 查询对战所参与的盲盒列表
     * 
     * @param tBattleBox 对战所参与的盲盒
     * @return 对战所参与的盲盒集合
     */
    public List<TBattleBox> selectTBattleBoxList(TBattleBox tBattleBox);

    /**
     * 新增对战所参与的盲盒
     * 
     * @param tBattleBox 对战所参与的盲盒
     * @return 结果
     */
    public int insertTBattleBox(TBattleBox tBattleBox);

    /**
     * 修改对战所参与的盲盒
     * 
     * @param tBattleBox 对战所参与的盲盒
     * @return 结果
     */
    public int updateTBattleBox(TBattleBox tBattleBox);

    /**
     * 删除对战所参与的盲盒
     * 
     * @param battleboxId 对战所参与的盲盒ID
     * @return 结果
     */
    public int deleteTBattleBoxById(String battleboxId);

    /**
     * 批量删除对战所参与的盲盒
     * 
     * @param battleboxIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteTBattleBoxByIds(String[] battleboxIds);

    public int insertTBattleBoxBatch(List<TBattleBox> list);

    /*@Cacheable(value="battleListCache", key="'getBoxByBattleId_battleId_'+#p0+'_userId_'+#p1")*/
    public List<TBattleBox> getBoxByBattleId(@Param("battleId") String battleId,@Param("userId") String userId);


    public List<TBattleBox> getBoxAndGoodsByBattleId(@Param("beanList") List<TBattleInfo> beanList);


    public List<TBattleBox> getBoxByBattleId1(@Param("battleId") String battleId,@Param("userId") String userId);

    public List<TBattleBox> getBattleBoxByBattleIds(@Param("battlerIds") List<String> battlerIds);

    public int batchUpdateBattleBox(List<TBattleBox> list);

    public List<TBattleBox> boxListV2ByBattleId(String battleId);
}
